import { STreasureInfo } from "../../../../Message/Public/STreasureInfo";
import { Cache } from "../../cache/Cache";
import { ItemData } from "../../resource/info/ItemData";
//class FairylandTreasureData
    
    export  class FairylandTreasureData
    {
        

        public static addTreasureInfo(arg1: STreasureInfo): void
        {
            FairylandTreasureData.treasureInfoArr.push(arg1);
            return;
        }

        public static get treasureInfos(): Array<any>
        {
            return FairylandTreasureData.treasureInfoArr;
        }

        public static set treasureInfos(arg1: Array<any>)
        {
            FairylandTreasureData.treasureInfoArr = arg1;
            return;
        }

        public static addItemAmount(): void
        {
            var loc1=null;
            var loc2=[];
            var loc3=0;
            while (loc3 < FairylandTreasureData.treasureInfoArr.length) 
            {
                if (FairylandTreasureData.treasureInfoArr[loc3] != null) 
                {
                    loc1 = FairylandTreasureData.treasureInfoArr[loc3] as STreasureInfo;
                    loc2.push(loc1.itemCode);
                }
                ++loc3;
            }
            Cache.instance.pack.treasurePackCopy.updateItemAmount(loc2);
            return;
        }

        public static recordItemData(arg1: ItemData): void
        {
            FairylandTreasureData.itemDatas.push(arg1);
            return;
        }

        /* internal */ static /* var */treasureInfoArr: Array<any>;

        public static /* var */itemDatas: Array<any>;
    }

            FairylandTreasureData.treasureInfoArr = [];
            FairylandTreasureData.itemDatas = [];
        